{	Problem: http://codeforces.ru/problemset/problem/43/B
	Verdict: Accepted

}
var i,k:longint; s,t:string; res:boolean;
begin
readln(s);
readln(t);
res:=true;
i:=0;
while (res) and (i<length(t)) do begin
  inc(i);
  if t[i]<>' ' then begin
    k:=pos(t[i],s);
    if k=0 then res:=false else delete(s,k,1);
  end;
end;
if res then writeln('YES') else writeln('NO');
end.